<%@ page import="com.chinaunicom.research.bigdatalabs.util.Pair" %>
<%@ page import="static com.chinaunicom.research.bigdatalabs.util.Tools.*" %>
<%@ page import="com.chinaunicom.research.bigdatalabs.util.ConnDB" %>
<%@ page import="java.sql.ResultSet" %>
<%--
  Created by IntelliJ IDEA.
  User: xinrong
  Date: 2014/11/27
  Time: 19:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
    String phone = null;
    Object number = request.getParameter("number");
    if (number != null && !number.toString().isEmpty() || (request.getSession().getAttribute("number") != null&&request.getSession().getAttribute("number") != null)) {
        if (number != null && !number.toString().isEmpty()) {
            request.getSession().setAttribute("number", number);
        }
        phone = request.getSession().getAttribute("number").toString();
    } else {
        response.sendRedirect(request.getContextPath() + "/pages/startpage.jsp");
    }

    int offset=5;
//    String id=getID(phone);
//    if(!notNullOrEmpty(id)){
//        id=getID("18601104443");
//    }

    Pair<int[], int[]> pair = LoadData(Pair.class.getResource("/CB.txt_score.csv").getPath(), 900, 50);
    String value_x = Array2String(rangeName(pair.getKey()), offset, pair.getKey().length);
    String value_y = Array2String(pair.getValue(), offset, pair.getValue().length);

    Pair<Integer,Integer> rs=new Pair<Integer, Integer>(743,14);

//    Pair<Integer,Integer> rs=getPos(pair.getKey(),phone);
//    int[]self=getDesc(phone);


%>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<title>征信系统</title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/jquery.fullPage.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap-combined.min.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/self/style.css">
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery/jquery-ui-1.10.3.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery/jquery.fullPage.min.js"></script>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/bootstrap/bootstrap.min.js"
        type="text/javascript"></script>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/highcharts/funnel.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/highcharts/exporting.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/highcharts/highcharts-more.js"></script>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/baidumap/api.baidu.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/baidumap/api.map.baidu.js"></script>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/echarts-2.1.8/build/dist/echarts.js"></script>
<style>
    body {
        font: 14px/1.6 "Microsoft Yahei";
    }

    /*.inner {*/
        /*position: relative;*/
        /*width: 1100px;*/
        /*margin: 0 auto;*/
    /*}*/

    .dowebok-hd {
        position: fixed;
        z-index: 1000;
        width: 100%;
        height: 64px;
        vertical-align: middle;
        background: url(<%=request.getContextPath()%>/img/bar.png) 0 0 repeat-x;
    }

    .dowebok-hd h1 {
        float: left;
        width: 150px;
        height: 64px;
        margin-top: 0;
    }

    .dowebok-hd p {
        float: left;
        font-size: x-large;
        color: #ffffff;
        margin-left: 100px;
        margin-top: 10px;
    }

    .dowebok-hd h1 a {
        display: block;
        width: 150px;
        height: 64px;
        text-indent: -9999px;
        background-image: url(<%=request.getContextPath()%>/img/logo_unicom.png);
    }

    .dowebok-hd .nav { float: right; list-style-type: none;}
    .dowebok-hd .nav li { float: left; margin-left: 5px;}
    .dowebok-hd .nav a { float: left; padding: 0 10px; line-height: 64px; color: #ffffff; text-decoration: none;}
    .dowebok-hd .nav a:hover { height: 62px; border-bottom: 2px solid #b80b0d;}


    .section {
        text-align: center;
        font: 25px "Microsoft Yahei";
        color: #ffffff;
    }
    #fullPage-nav span, .fp-slidesNav span { border: 1px solid #999;}
    #fullPage-nav li .active span, .fp-slidesNav.active span { background-color: #ffffff;}
</style>

<script type="text/javascript">
require.config({
    paths: {
        echarts: '../js/echarts-2.1.8/build/dist'
    }
});

 theme = {
    // 全图默认背景
    backgroundColor: '#2A2A2A',

    // 默认色板
    color: [
        '#FE8463','#9BCA63','#FAD860','#60C0DD','#0084C6',
        '#D7504B','#C6E579','#26C0C0','#F0805A','#F4E001',
        '#B5C334'
    ],

    // 图表标题
    title: {
        itemGap: 8,
        textStyle: {
            fontWeight: 'normal',
            color: '#fff'          // 主标题文字颜色
        }
    },

    // 图例
    legend: {
        itemGap: 8,
        textStyle: {
            color: '#ccc'          // 图例文字颜色
        }
    },

    // 值域
    dataRange: {
        itemWidth: 15,
        color: ['#FFF808','#21BCF9'],
        textStyle: {
            color: '#ccc'          // 值域文字颜色
        }
    },

    toolbox: {
        color : ['#fff', '#fff', '#fff', '#fff'],
        effectiveColor : '#FE8463',
        disableColor: '#666',
        itemGap: 8
    },

    // 提示框
    tooltip: {
        backgroundColor: 'rgba(250,250,250,0.8)',     // 提示背景颜色，默认为透明度为0.7的黑色
        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
            type : 'line',         // 默认为直线，可选为：'line' | 'shadow'
            lineStyle : {          // 直线指示器样式设置
                color: '#aaa'
            },
            crossStyle: {
                color: '#aaa'
            },
            shadowStyle : {                     // 阴影指示器样式设置
                color: 'rgba(200,200,200,0.2)'
            }
        },
        textStyle: {
            color: '#333'
        }
    },

    // 区域缩放控制器
    dataZoom: {
        dataBackgroundColor: '#555',            // 数据背景颜色
        fillerColor: 'rgba(200,200,200,0.2)',   // 填充颜色
        handleColor: '#eee'     // 手柄颜色
    },

    // 网格
    grid: {
        borderWidth: 0
    },

    // 类目轴
    categoryAxis: {
        axisLine: {            // 坐标轴线
            show: false
        },
        axisTick: {            // 坐标轴小标记
            show: false
        },
        axisLabel: {           // 坐标轴文本标签，详见axis.axisLabel
            textStyle: {       // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                color: '#ccc'
            }
        },
        splitLine: {           // 分隔线
            show: false
        }
    },

    // 数值型坐标轴默认参数
    valueAxis: {
        axisLine: {            // 坐标轴线
            show: false
        },
        axisTick: {            // 坐标轴小标记
            show: false
        },
        axisLabel: {           // 坐标轴文本标签，详见axis.axisLabel
            textStyle: {       // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                color: '#ccc'
            }
        },
        splitLine: {           // 分隔线
            lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
                color: ['#aaa'],
                type: 'dashed'
            }
        },
        splitArea: {           // 分隔区域
            show: false
        }
    },

    polar : {
        name : {
            textStyle: {       // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                color: '#ccc'
            }
        },
        axisLine: {            // 坐标轴线
            lineStyle: {       // 属性lineStyle控制线条样式
                color: '#ddd'
            }
        },
        splitArea : {
            show : true,
            areaStyle : {
                color: ['rgba(250,250,250,0.2)','rgba(200,200,200,0.2)']
            }
        },
        splitLine : {
            lineStyle : {
                color : '#ddd'
            }
        }
    },

    timeline : {
        label: {
            textStyle:{
                color: '#ccc'
            }
        },
        lineStyle : {
            color : '#aaa'
        },
        controlStyle : {
            normal : { color : '#fff'},
            emphasis : { color : '#FE8463'}
        },
        symbolSize : 3
    },

    // 折线图默认参数
    line: {
        smooth : true
    },

    // K线图默认参数
    k: {
        itemStyle: {
            normal: {
                color: '#FE8463',       // 阳线填充颜色
                color0: '#9BCA63',      // 阴线填充颜色
                lineStyle: {
                    width: 1,
                    color: '#FE8463',   // 阳线边框颜色
                    color0: '#9BCA63'   // 阴线边框颜色
                }
            }
        }
    },

    // 雷达图默认参数
    radar : {
        symbol: 'emptyCircle',    // 图形类型
        symbolSize:3
        //symbol: null,         // 拐点图形类型
        //symbolRotate : null,  // 图形旋转控制
    },

    pie: {
        itemStyle: {
            normal: {
                borderWidth: 1,
                borderColor : 'rgba(255, 255, 255, 0.5)'
            },
            emphasis: {
                borderWidth: 1,
                borderColor : 'rgba(255, 255, 255, 1)'
            }
        }
    },

    map: {
        itemStyle: {
            normal: {
                borderColor:'rgba(255, 255, 255, 0.5)',
                areaStyle: {
                    color: '#d7db99'
                },
                label: {
                    textStyle: {
                        color: '#ccc'
                    }
                }
            },
            emphasis: {                 // 也是选中样式
                areaStyle: {
                    color: '#FE8463'
                },
                label: {
                    textStyle: {
                        color: '#ccc'
                    }
                }
            }
        }
    },

    force : {
        itemStyle: {
            normal: {
                linkStyle : {
                    strokeColor : '#fff'
                }
            }
        }
    },

    chord : {
        padding : 4,
        itemStyle : {
            normal : {
                lineStyle : {
                    width : 1,
                    color : 'rgba(228, 228, 228, 0.2)'
                },
                chordStyle : {
                    lineStyle : {
                        width : 1,
                        color : 'rgba(228, 228, 228, 0.2)'
                    }
                }
            },
            emphasis : {
                lineStyle : {
                    width : 1,
                    color : 'rgba(228, 228, 228, 0.9)'
                },
                chordStyle : {
                    lineStyle : {
                        width : 1,
                        color : 'rgba(228, 228, 228, 0.9)'
                    }
                }
            }
        }
    },

    gauge : {
        startAngle: 225,
        endAngle : -45,
        axisLine: {            // 坐标轴线
            show: true,        // 默认显示，属性show控制显示与否
            lineStyle: {       // 属性lineStyle控制线条样式
                color: [[0.2, '#9BCA63'],[0.8, '#60C0DD'],[1, '#D7504B']],
                width: 3,
                shadowColor : '#fff', //默认透明
                shadowBlur: 10
            }
        },
        axisTick: {            // 坐标轴小标记
            length :15,        // 属性length控制线长
            lineStyle: {       // 属性lineStyle控制线条样式
                color: 'auto',
                shadowColor : '#fff', //默认透明
                shadowBlur: 10
            }
        },
        axisLabel: {            // 坐标轴小标记
            textStyle: {       // 属性lineStyle控制线条样式
                fontWeight: 'bolder',
                color: '#fff',
                shadowColor : '#fff', //默认透明
                shadowBlur: 10
            }
        },
        splitLine: {           // 分隔线
            length :25,         // 属性length控制线长
            lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
                width:3,
                color: '#fff',
                shadowColor : '#fff', //默认透明
                shadowBlur: 10
            }
        },
        pointer: {           // 分隔线
            shadowColor : '#fff', //默认透明
            shadowBlur: 5
        },
        title : {
            textStyle: {       // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                fontWeight: 'bolder',
                fontSize: 20,
                fontStyle: 'italic',
                color: '#fff',
                shadowColor : '#fff', //默认透明
                shadowBlur: 10
            }
        },
        detail : {
            shadowColor : '#fff', //默认透明
            shadowBlur: 5,
            offsetCenter: [0, '50%'],       // x, y，单位px
            textStyle: {       // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                fontWeight: 'bolder',
                color: '#fff'
            }
        }
    },

    funnel : {
        itemStyle: {
            normal: {
                borderColor : 'rgba(255, 255, 255, 0.5)',
                borderWidth: 1
            },
            emphasis: {
                borderColor : 'rgba(255, 255, 255, 1)',
                borderWidth: 1
            }
        }
    },

    textStyle: {
        fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
    }
};

function distribution(){
    // 使用
    require(
            [
                'echarts',
                'echarts/chart/bar'

            ],
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('base_info'));
                myChart.setTheme(theme);
                var option = {
                    title : {
                        text: '4G用户信用评分分布',
                        subtext: 'By NanBo'
                    },
                    tooltip : {
                        trigger: 'axis'
                    },
                    legend: {
                        data:['信用分数']
                    },
                    toolbox: {
                        show : true,
                        feature : {
                            mark : {show: true},
                            dataView : {show: true, readOnly: false},
                            magicType : {show: true, type: ['line', 'bar']},
                            restore : {show: true},
                            saveAsImage : {show: true}
                        }
                    },
                    calculable : true,
                    xAxis : [
                        {
                            type : 'category',
                            data : [<%=value_x.replaceAll("\\[","'").replaceAll("\\]","'").replaceAll(",","','")%>]
                        }
                    ],
                    yAxis : [
                        {
                            type : 'value'
                        }
                    ],
                    series : [
                        {
                            name:'',
                            type:'bar',
                            data:<%=value_y%>,
                            markPoint : {
                                data : [
                                    {name : 'XX先生在这', value : <%=rs.getKey()%>, xAxis: <%=rs.getValue()-offset%>, yAxis: <%=pair.getValue()[rs.getValue()]+2%>, symbolSize:18}
//                                                                {type : 'max', name: '最大值'},
//                                                                {type : 'min', name: '最小值'}
                                ]
                            }
//                                                        markLine : {
//                                                            data : [
//                                                                {type : 'average', name: '平均值'}
//                                                            ]
//                                                        }
                        }
                    ]
                };


                // 为echarts对象加载数据
                myChart.setOption(option);
            }
    );
}

function comsume_line(){
    // 使用
    require(
            [
                'echarts',
                'echarts/chart/line'
            ],
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('finance'));
                myChart.setTheme(theme);

                var option = {
                    title :{
                        text : '月度消费走势',
                        subtext : 'By YH'
                    },
                    tooltip : {
                        trigger: 'axis',
                        formatter: function (params){
                            return params[0].name + ' : '
                                    + (params[2].value - params[1].value > 0 ? '+' : '-')
                                    + params[0].value + '<br/>'
                                    + params[2].seriesName + ' : ' + params[2].value + '<br/>'
                                    + params[3].seriesName + ' : ' + params[3].value + '<br/>'
                        }
                    },
                    toolbox: {
                        show : true,
                        feature : {
                            mark : {show: true},
                            dataView : {show: true, readOnly: false},
                            magicType : {show: true, type: ['line', 'bar']},
                            restore : {show: true},
                            saveAsImage : {show: true}
                        }
                    },
                    legend: {
                        data:['消费', '信用'],
                        selectedMode:false
                    },
                    xAxis : [
                        {
                            type : 'category',
                            data : ['Jan.','Feb.','Mar.','Apr.','May','Jun','Jul.']
                        }
                    ],
                    yAxis : [
                        {
                            type : 'value',
                            min : 200,
                            max : 450
                        }
                    ],
                    series : [
                        {
                            name:'信用',
                            type:'line',
                            data:[400, 374, 251, 300, 420, 400, 440]
                        },
                        {
                            name:'消费',
                            type:'line',
                            symbol:'none',
                            itemStyle:{
                                normal:{
                                    lineStyle: {
                                        width:1,
                                        type:'dashed'
                                    }
                                }
                            },
                            data:[320, 332, 301, 334, 360, 330, 350]
                        },
                        {
                            name:'上周2',
                            type:'bar',
                            stack: '1',
                            barWidth: 6,
                            itemStyle:{
                                normal:{
                                    color:'rgba(0,0,0,0)'
                                },
                                emphasis:{
                                    color:'rgba(0,0,0,0)'
                                }
                            },
                            data:[320, 332, 251, 300, 360, 330, 350]
                        },
                        {
                            name:'变化',
                            type:'bar',
                            stack: '1',
                            data:[
                                80, 42,
                                {value : 50, itemStyle:{ normal:{color:'red'}}},
                                {value : 34, itemStyle:{ normal:{color:'red'}}},
                                60, 70, 90
                            ]
                        }
                    ]
                };

                // 为echarts对象加载数据
                myChart.setOption(option);
            }
    )
}

function wonder_map() {
    // 使用
    require(
            [
                'echarts',
                'echarts/chart/map'
            ],
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('location'));
                myChart.setTheme(theme);

                var option = {
                    title: {
                        text: '位置数据',
                        subtext: 'data from chinanet',
//                        sublink: '',
                        x: 'center'
                    },
                    tooltip: {
                        trigger: 'item'
                    },
                    legend: {
                        orient: 'vertical',
                        x: 'left',
                        data: ['stay (day)']
                    },
                    dataRange: {
                        min: 0,
                        max: 500,
                        calculable: true,
                        color: ['maroon', 'purple', 'red', 'orange', 'yellow', 'lightgreen']
                    },
                    toolbox: {
                        show: true,
                        orient: 'vertical',
                        x: 'right',
                        y: 'center',
                        feature: {
                            mark: {show: true},
                            dataView: {show: true, readOnly: false},
                            restore: {show: true},
                            saveAsImage: {show: true}
                        }
                    },
                    series: [
                        {
                            name: 'stay',
                            type: 'map',
                            mapType: 'china',
                            hoverable: false,
                            roam: true,
                            data: [],
                            markPoint: {
                                symbolSize: 5,       // 标注大小，半宽（半径）参数，当图形为方向或菱形则总宽度为symbolSize * 2
                                itemStyle: {
                                    normal: {
                                        borderColor: '#87cefa',
                                        borderWidth: 1,            // 标注边线线宽，单位px，默认为1
                                        label: {
                                            show: false
                                        }
                                    },
                                    emphasis: {
                                        borderColor: '#1e90ff',
                                        borderWidth: 5,
                                        label: {
                                            show: false
                                        }
                                    }
                                },
                                data: [
                                    {name: "海门", value: 9},
                                    {name: "鄂尔多斯", value: 12},
                                    {name: "招远", value: 12},
                                    {name: "舟山", value: 12},
                                    {name: "齐齐哈尔", value: 14},
                                    {name: "盐城", value: 15},
                                    {name: "赤峰", value: 16},
                                    {name: "青岛", value: 18},
                                    {name: "乳山", value: 18},
                                    {name: "金昌", value: 19},
                                    {name: "泉州", value: 21},
                                    {name: "莱西", value: 21},
                                    {name: "日照", value: 21},
                                    {name: "胶南", value: 22},
                                    {name: "南通", value: 23},
                                    {name: "拉萨", value: 24},
                                    {name: "云浮", value: 24},
                                    {name: "梅州", value: 25},
                                    {name: "文登", value: 25},
                                    {name: "上海", value: 25},
                                    {name: "攀枝花", value: 25},
                                    {name: "威海", value: 25},
                                    {name: "承德", value: 25},
                                    {name: "厦门", value: 26},
                                    {name: "汕尾", value: 26},
                                    {name: "潮州", value: 26},
                                    {name: "丹东", value: 27},
                                    {name: "太仓", value: 27},
                                    {name: "曲靖", value: 27},
                                    {name: "烟台", value: 28},
                                    {name: "福州", value: 29},
                                    {name: "瓦房店", value: 30},
                                    {name: "即墨", value: 30},
                                    {name: "抚顺", value: 31},
                                    {name: "玉溪", value: 31},
                                    {name: "张家口", value: 31},
                                    {name: "阳泉", value: 31},
                                    {name: "莱州", value: 32},
                                    {name: "湖州", value: 32},
                                    {name: "汕头", value: 32},
                                    {name: "昆山", value: 33},
                                    {name: "宁波", value: 33},
                                    {name: "湛江", value: 33},
                                    {name: "揭阳", value: 34},
                                    {name: "荣成", value: 34},
                                    {name: "连云港", value: 35},
                                    {name: "葫芦岛", value: 35},
                                    {name: "常熟", value: 36},
                                    {name: "东莞", value: 36},
                                    {name: "河源", value: 36},
                                    {name: "淮安", value: 36},
                                    {name: "泰州", value: 36},
                                    {name: "南宁", value: 37},
                                    {name: "营口", value: 37},
                                    {name: "惠州", value: 37},
                                    {name: "江阴", value: 37},
                                    {name: "蓬莱", value: 37},
                                    {name: "韶关", value: 38},
                                    {name: "嘉峪关", value: 38},
                                    {name: "广州", value: 38},
                                    {name: "延安", value: 38},
                                    {name: "太原", value: 39},
                                    {name: "清远", value: 39},
                                    {name: "中山", value: 39},
                                    {name: "昆明", value: 39},
                                    {name: "寿光", value: 40},
                                    {name: "盘锦", value: 40},
                                    {name: "长治", value: 41},
                                    {name: "深圳", value: 41},
                                    {name: "珠海", value: 42},
                                    {name: "宿迁", value: 43},
                                    {name: "咸阳", value: 43},
                                    {name: "铜川", value: 44},
                                    {name: "平度", value: 44},
                                    {name: "佛山", value: 44},
                                    {name: "海口", value: 44},
                                    {name: "江门", value: 45},
                                    {name: "章丘", value: 45},
                                    {name: "肇庆", value: 46},
                                    {name: "大连", value: 47},
                                    {name: "临汾", value: 47},
                                    {name: "吴江", value: 47},
                                    {name: "石嘴山", value: 49},
                                    {name: "沈阳", value: 50},
                                    {name: "苏州", value: 50},
                                    {name: "茂名", value: 50},
                                    {name: "嘉兴", value: 51},
                                    {name: "长春", value: 51},
                                    {name: "胶州", value: 52},
                                    {name: "银川", value: 52},
                                    {name: "张家港", value: 52},
                                    {name: "三门峡", value: 53},
                                    {name: "锦州", value: 54},
                                    {name: "南昌", value: 54},
                                    {name: "柳州", value: 54},
                                    {name: "三亚", value: 54},
                                    {name: "自贡", value: 56},
                                    {name: "吉林", value: 56},
                                    {name: "阳江", value: 57},
                                    {name: "泸州", value: 57},
                                    {name: "西宁", value: 57},
                                    {name: "宜宾", value: 58},
                                    {name: "呼和浩特", value: 58},
                                    {name: "成都", value: 58},
                                    {name: "大同", value: 58},
                                    {name: "镇江", value: 59},
                                    {name: "桂林", value: 59},
                                    {name: "张家界", value: 59},
                                    {name: "宜兴", value: 59},
                                    {name: "北海", value: 60},
                                    {name: "西安", value: 61},
                                    {name: "金坛", value: 62},
                                    {name: "东营", value: 62},
                                    {name: "牡丹江", value: 63},
                                    {name: "遵义", value: 63},
                                    {name: "绍兴", value: 63},
                                    {name: "扬州", value: 64},
                                    {name: "常州", value: 64},
                                    {name: "潍坊", value: 65},
                                    {name: "重庆", value: 66},
                                    {name: "台州", value: 67},
                                    {name: "南京", value: 67},
                                    {name: "滨州", value: 70},
                                    {name: "贵阳", value: 71},
                                    {name: "无锡", value: 71},
                                    {name: "本溪", value: 71},
                                    {name: "克拉玛依", value: 72},
                                    {name: "渭南", value: 72},
                                    {name: "马鞍山", value: 72},
                                    {name: "宝鸡", value: 72},
                                    {name: "焦作", value: 75},
                                    {name: "句容", value: 75},
                                    {name: "北京", value: 79},
                                    {name: "徐州", value: 79},
                                    {name: "衡水", value: 80},
                                    {name: "包头", value: 80},
                                    {name: "绵阳", value: 80},
                                    {name: "乌鲁木齐", value: 84},
                                    {name: "枣庄", value: 84},
                                    {name: "杭州", value: 84},
                                    {name: "淄博", value: 85},
                                    {name: "鞍山", value: 86},
                                    {name: "溧阳", value: 86},
                                    {name: "库尔勒", value: 86},
                                    {name: "安阳", value: 90},
                                    {name: "开封", value: 90},
                                    {name: "济南", value: 92},
                                    {name: "德阳", value: 93},
                                    {name: "温州", value: 95},
                                    {name: "九江", value: 96},
                                    {name: "邯郸", value: 98},
                                    {name: "临安", value: 99},
                                    {name: "兰州", value: 99},
                                    {name: "沧州", value: 100},
                                    {name: "临沂", value: 103},
                                    {name: "南充", value: 104},
                                    {name: "天津", value: 105},
                                    {name: "富阳", value: 106},
                                    {name: "泰安", value: 112},
                                    {name: "诸暨", value: 112},
                                    {name: "郑州", value: 113},
                                    {name: "哈尔滨", value: 114},
                                    {name: "聊城", value: 116},
                                    {name: "芜湖", value: 117},
                                    {name: "唐山", value: 119},
                                    {name: "平顶山", value: 119},
                                    {name: "邢台", value: 119},
                                    {name: "德州", value: 120},
                                    {name: "济宁", value: 120},
                                    {name: "荆州", value: 127},
                                    {name: "宜昌", value: 130},
                                    {name: "义乌", value: 132},
                                    {name: "丽水", value: 133},
                                    {name: "洛阳", value: 134},
                                    {name: "秦皇岛", value: 136},
                                    {name: "株洲", value: 143},
                                    {name: "石家庄", value: 147},
                                    {name: "莱芜", value: 148},
                                    {name: "常德", value: 152},
                                    {name: "保定", value: 153},
                                    {name: "湘潭", value: 154},
                                    {name: "金华", value: 157},
                                    {name: "岳阳", value: 169},
                                    {name: "长沙", value: 175},
                                    {name: "衢州", value: 177},
                                    {name: "廊坊", value: 193},
                                    {name: "菏泽", value: 194},
                                    {name: "合肥", value: 229},
                                    {name: "武汉", value: 273},
                                    {name: "大庆", value: 279}
                                ]
                            },
                            geoCoord: {
                                "海门": [121.15, 31.89],
                                "鄂尔多斯": [109.781327, 39.608266],
                                "招远": [120.38, 37.35],
                                "舟山": [122.207216, 29.985295],
                                "齐齐哈尔": [123.97, 47.33],
                                "盐城": [120.13, 33.38],
                                "赤峰": [118.87, 42.28],
                                "青岛": [120.33, 36.07],
                                "乳山": [121.52, 36.89],
                                "金昌": [102.188043, 38.520089],
                                "泉州": [118.58, 24.93],
                                "莱西": [120.53, 36.86],
                                "日照": [119.46, 35.42],
                                "胶南": [119.97, 35.88],
                                "南通": [121.05, 32.08],
                                "拉萨": [91.11, 29.97],
                                "云浮": [112.02, 22.93],
                                "梅州": [116.1, 24.55],
                                "文登": [122.05, 37.2],
                                "上海": [121.48, 31.22],
                                "攀枝花": [101.718637, 26.582347],
                                "威海": [122.1, 37.5],
                                "承德": [117.93, 40.97],
                                "厦门": [118.1, 24.46],
                                "汕尾": [115.375279, 22.786211],
                                "潮州": [116.63, 23.68],
                                "丹东": [124.37, 40.13],
                                "太仓": [121.1, 31.45],
                                "曲靖": [103.79, 25.51],
                                "烟台": [121.39, 37.52],
                                "福州": [119.3, 26.08],
                                "瓦房店": [121.979603, 39.627114],
                                "即墨": [120.45, 36.38],
                                "抚顺": [123.97, 41.97],
                                "玉溪": [102.52, 24.35],
                                "张家口": [114.87, 40.82],
                                "阳泉": [113.57, 37.85],
                                "莱州": [119.942327, 37.177017],
                                "湖州": [120.1, 30.86],
                                "汕头": [116.69, 23.39],
                                "昆山": [120.95, 31.39],
                                "宁波": [121.56, 29.86],
                                "湛江": [110.359377, 21.270708],
                                "揭阳": [116.35, 23.55],
                                "荣成": [122.41, 37.16],
                                "连云港": [119.16, 34.59],
                                "葫芦岛": [120.836932, 40.711052],
                                "常熟": [120.74, 31.64],
                                "东莞": [113.75, 23.04],
                                "河源": [114.68, 23.73],
                                "淮安": [119.15, 33.5],
                                "泰州": [119.9, 32.49],
                                "南宁": [108.33, 22.84],
                                "营口": [122.18, 40.65],
                                "惠州": [114.4, 23.09],
                                "江阴": [120.26, 31.91],
                                "蓬莱": [120.75, 37.8],
                                "韶关": [113.62, 24.84],
                                "嘉峪关": [98.289152, 39.77313],
                                "广州": [113.23, 23.16],
                                "延安": [109.47, 36.6],
                                "太原": [112.53, 37.87],
                                "清远": [113.01, 23.7],
                                "中山": [113.38, 22.52],
                                "昆明": [102.73, 25.04],
                                "寿光": [118.73, 36.86],
                                "盘锦": [122.070714, 41.119997],
                                "长治": [113.08, 36.18],
                                "深圳": [114.07, 22.62],
                                "珠海": [113.52, 22.3],
                                "宿迁": [118.3, 33.96],
                                "咸阳": [108.72, 34.36],
                                "铜川": [109.11, 35.09],
                                "平度": [119.97, 36.77],
                                "佛山": [113.11, 23.05],
                                "海口": [110.35, 20.02],
                                "江门": [113.06, 22.61],
                                "章丘": [117.53, 36.72],
                                "肇庆": [112.44, 23.05],
                                "大连": [121.62, 38.92],
                                "临汾": [111.5, 36.08],
                                "吴江": [120.63, 31.16],
                                "石嘴山": [106.39, 39.04],
                                "沈阳": [123.38, 41.8],
                                "苏州": [120.62, 31.32],
                                "茂名": [110.88, 21.68],
                                "嘉兴": [120.76, 30.77],
                                "长春": [125.35, 43.88],
                                "胶州": [120.03336, 36.264622],
                                "银川": [106.27, 38.47],
                                "张家港": [120.555821, 31.875428],
                                "三门峡": [111.19, 34.76],
                                "锦州": [121.15, 41.13],
                                "南昌": [115.89, 28.68],
                                "柳州": [109.4, 24.33],
                                "三亚": [109.511909, 18.252847],
                                "自贡": [104.778442, 29.33903],
                                "吉林": [126.57, 43.87],
                                "阳江": [111.95, 21.85],
                                "泸州": [105.39, 28.91],
                                "西宁": [101.74, 36.56],
                                "宜宾": [104.56, 29.77],
                                "呼和浩特": [111.65, 40.82],
                                "成都": [104.06, 30.67],
                                "大同": [113.3, 40.12],
                                "镇江": [119.44, 32.2],
                                "桂林": [110.28, 25.29],
                                "张家界": [110.479191, 29.117096],
                                "宜兴": [119.82, 31.36],
                                "北海": [109.12, 21.49],
                                "西安": [108.95, 34.27],
                                "金坛": [119.56, 31.74],
                                "东营": [118.49, 37.46],
                                "牡丹江": [129.58, 44.6],
                                "遵义": [106.9, 27.7],
                                "绍兴": [120.58, 30.01],
                                "扬州": [119.42, 32.39],
                                "常州": [119.95, 31.79],
                                "潍坊": [119.1, 36.62],
                                "重庆": [106.54, 29.59],
                                "台州": [121.420757, 28.656386],
                                "南京": [118.78, 32.04],
                                "滨州": [118.03, 37.36],
                                "贵阳": [106.71, 26.57],
                                "无锡": [120.29, 31.59],
                                "本溪": [123.73, 41.3],
                                "克拉玛依": [84.77, 45.59],
                                "渭南": [109.5, 34.52],
                                "马鞍山": [118.48, 31.56],
                                "宝鸡": [107.15, 34.38],
                                "焦作": [113.21, 35.24],
                                "句容": [119.16, 31.95],
                                "北京": [116.46, 39.92],
                                "徐州": [117.2, 34.26],
                                "衡水": [115.72, 37.72],
                                "包头": [110, 40.58],
                                "绵阳": [104.73, 31.48],
                                "乌鲁木齐": [87.68, 43.77],
                                "枣庄": [117.57, 34.86],
                                "杭州": [120.19, 30.26],
                                "淄博": [118.05, 36.78],
                                "鞍山": [122.85, 41.12],
                                "溧阳": [119.48, 31.43],
                                "库尔勒": [86.06, 41.68],
                                "安阳": [114.35, 36.1],
                                "开封": [114.35, 34.79],
                                "济南": [117, 36.65],
                                "德阳": [104.37, 31.13],
                                "温州": [120.65, 28.01],
                                "九江": [115.97, 29.71],
                                "邯郸": [114.47, 36.6],
                                "临安": [119.72, 30.23],
                                "兰州": [103.73, 36.03],
                                "沧州": [116.83, 38.33],
                                "临沂": [118.35, 35.05],
                                "南充": [106.110698, 30.837793],
                                "天津": [117.2, 39.13],
                                "富阳": [119.95, 30.07],
                                "泰安": [117.13, 36.18],
                                "诸暨": [120.23, 29.71],
                                "郑州": [113.65, 34.76],
                                "哈尔滨": [126.63, 45.75],
                                "聊城": [115.97, 36.45],
                                "芜湖": [118.38, 31.33],
                                "唐山": [118.02, 39.63],
                                "平顶山": [113.29, 33.75],
                                "邢台": [114.48, 37.05],
                                "德州": [116.29, 37.45],
                                "济宁": [116.59, 35.38],
                                "荆州": [112.239741, 30.335165],
                                "宜昌": [111.3, 30.7],
                                "义乌": [120.06, 29.32],
                                "丽水": [119.92, 28.45],
                                "洛阳": [112.44, 34.7],
                                "秦皇岛": [119.57, 39.95],
                                "株洲": [113.16, 27.83],
                                "石家庄": [114.48, 38.03],
                                "莱芜": [117.67, 36.19],
                                "常德": [111.69, 29.05],
                                "保定": [115.48, 38.85],
                                "湘潭": [112.91, 27.87],
                                "金华": [119.64, 29.12],
                                "岳阳": [113.09, 29.37],
                                "长沙": [113, 28.21],
                                "衢州": [118.88, 28.97],
                                "廊坊": [116.7, 39.53],
                                "菏泽": [115.480656, 35.23375],
                                "合肥": [117.27, 31.86],
                                "武汉": [114.31, 30.52],
                                "大庆": [125.03, 46.58]
                            }
                        },
                        {
                            name: 'Top5',
                            type: 'map',
                            mapType: 'china',
                            data: [],
                            markPoint: {
                                symbol: 'emptyCircle',
                                symbolSize: function (v) {
                                    return 10 + v / 100
                                },
                                effect: {
                                    show: true,
                                    shadowBlur: 0
                                },
                                itemStyle: {
                                    normal: {
                                        label: {show: false}
                                    }
                                },
                                data: [
                                    {name: "廊坊", value: 193},
                                    {name: "菏泽", value: 194},
                                    {name: "合肥", value: 229},
                                    {name: "武汉", value: 273},
                                    {name: "大庆", value: 279}
                                ]
                            }
                        }
                    ]
                };


                // 为echarts对象加载数据
                myChart.setOption(option);
            }
    )
}

function social_force() {
    // 使用
    require(
            [
                'echarts',
                'echarts/chart/force'
            ],
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('network'));
                myChart.setTheme(theme);
                var option = {
                    title : {
                        text: '人物关系：乔布斯',
                        subtext: 'BY YANHUI TU',
                        x:'right',
                        y:'bottom'
                    },
                    tooltip : {
                        trigger: 'item',
                        formatter: '{a} : {b}'
                    },
                    toolbox: {
                        show : true,
                        feature : {
                            restore : {show: true},
                            magicType: {show: true, type: ['force', 'chord']},
                            saveAsImage : {show: true}
                        }
                    },
                    legend: {
                        x: 'left',
                        data:['家人','朋友']
                    },
                    series : [
                        {
                            type:'force',
                            name : "关系网络",
                            ribbonType: false,
                            categories : [
                                {
                                    name: '人物'
                                },
                                {
                                    name: '家人'
                                },
                                {
                                    name:'朋友'
                                }
                            ],
                            itemStyle: {
                                normal: {
                                    label: {
                                        show: true,
                                        textStyle: {
                                            color: '#333'
                                        }
                                    },
                                    nodeStyle : {
                                        brushType : 'both',
                                        borderColor : 'rgba(255,215,0,0.4)',
                                        borderWidth : 1
                                    },
                                    linkStyle: {
                                        type: 'curve'
                                    }
                                },
                                emphasis: {
                                    label: {
                                        show: false
                                        // textStyle: null      // 默认使用全局文本样式，详见TEXTSTYLE
                                    },
                                    nodeStyle : {
                                        //r: 30
                                    },
                                    linkStyle : {}
                                }
                            },
                            useWorker: false,
                            minRadius : 15,
                            maxRadius : 25,
                            gravity: 1.1,
                            scaling: 1.1,
                            roam: 'move',
                            nodes:[
                                {category:0, name: '乔布斯', value : 10},
                                {category:1, name: '丽萨-乔布斯',value : 2},
                                {category:1, name: '保罗-乔布斯',value : 3},
                                {category:1, name: '克拉拉-乔布斯',value : 3},
                                {category:1, name: '劳伦-鲍威尔',value : 7},
                                {category:2, name: '史蒂夫-沃兹尼艾克',value : 5},
                                {category:2, name: '奥巴马',value : 8},
                                {category:2, name: '比尔-盖茨',value : 9},
                                {category:2, name: '乔纳森-艾夫',value : 4},
                                {category:2, name: '蒂姆-库克',value : 4},
                                {category:2, name: '龙-韦恩',value : 1}
                            ],
                            links : [
                                {source : '丽萨-乔布斯', target : '乔布斯', weight : 1, name: '女儿'},
                                {source : '保罗-乔布斯', target : '乔布斯', weight : 2, name: '父亲'},
                                {source : '克拉拉-乔布斯', target : '乔布斯', weight : 1, name: '母亲'},
                                {source : '劳伦-鲍威尔', target : '乔布斯', weight : 2},
                                {source : '史蒂夫-沃兹尼艾克', target : '乔布斯', weight : 3, name: '合伙人'},
                                {source : '奥巴马', target : '乔布斯', weight : 1},
                                {source : '比尔-盖茨', target : '乔布斯', weight : 6, name: '竞争对手'},
                                {source : '乔纳森-艾夫', target : '乔布斯', weight : 1, name: '爱将'},
                                {source : '蒂姆-库克', target : '乔布斯', weight : 1},
                                {source : '龙-韦恩', target : '乔布斯', weight : 1},
                                {source : '克拉拉-乔布斯', target : '保罗-乔布斯', weight : 1},
                                {source : '奥巴马', target : '保罗-乔布斯', weight : 1},
                                {source : '奥巴马', target : '克拉拉-乔布斯', weight : 1},
                                {source : '奥巴马', target : '劳伦-鲍威尔', weight : 1},
                                {source : '奥巴马', target : '史蒂夫-沃兹尼艾克', weight : 1},
                                {source : '比尔-盖茨', target : '奥巴马', weight : 6},
                                {source : '比尔-盖茨', target : '克拉拉-乔布斯', weight : 1},
                                {source : '蒂姆-库克', target : '奥巴马', weight : 1}
                            ]
                        }
                    ]
                };
                var ecConfig = require('echarts/config');
                function focus(param) {
                    var data = param.data;
                    var links = option.series[0].links;
                    var nodes = option.series[0].nodes;
                    if (
                            data.source !== undefined
                            && data.target !== undefined
                            ) { //点击的是边
                        var sourceNode = nodes[data.source];
                        var targetNode = nodes[data.target];
                        console.log("选中了边 " + sourceNode.name + ' -> ' + targetNode.name + ' (' + data.weight + ')');
                    } else { // 点击的是点
                        console.log("选中了" + data.name + '(' + data.value + ')');
                    }
                }
                myChart.on(ecConfig.EVENT.CLICK, focus);

                myChart.on(ecConfig.EVENT.FORCE_LAYOUT_END, function () {
                    console.log(myChart.chart.force.getPosition());
                });

                // 为echarts对象加载数据
                myChart.setOption(option);
            }
    )
}

function ability_radar(){
    // 使用
    require(
            [
                'echarts',
                'echarts/chart/radar'
            ],
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('abilityradar'));
                myChart.setTheme(theme);

                var option = {
                    title : {
                        text: 'Mr. X',
                        subtext: '综合实力展示'
                    },
                    tooltip : {
                        trigger: 'axis'
                    },
                    legend: {
                        x : 'center',
                        data:['Mr. X']
                    },
                    toolbox: {
                        show : true,
                        feature : {
                            mark : {show: true},
                            dataView : {show: true, readOnly: false},
                            restore : {show: true},
                            saveAsImage : {show: true}
                        }
                    },
                    calculable : true,
                    polar : [
                        {
                            indicator : [
                                {text: '套餐', max: 100},
                                {text: '消费', max: 100},
                                {text: '年龄', max: 100},
                                {text: '在网年限', max: 100},
                                {text: '社会关系', max: 100},
                                {text: '通信', max: 100}
                            ],
                            radius : 130
                        }
                    ],
                    series : [
                        {
                            name: '信用数据',
                            type: 'radar',
                            itemStyle: {
                                normal: {
                                    areaStyle: {
                                        type: 'default'
                                    }
                                }
                            },
                            data : [
                                {
                                    value : [97, 42, 88, 94, 90, 86],
                                    name : 'Mr. X'
                                }
                            ]
                        }
                    ]
                };

                // 为echarts对象加载数据
                myChart.setOption(option);
            }
    );
}

function isSupportCanvas() {
    var elem = document.createElement('canvas');
    return !!(elem.getContext && elem.getContext('2d'));
}

$(document).ready(function () {
    $.fn.fullpage({
        slidesColor: ['#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff'],
        anchors: ['page1', 'page2', 'page3', 'page4', 'page5','page6','page7','page8'],
        menu: '#menu',
        navigation: true,
        loopBottom:true,
        afterRender: function () {
            distribution();
            comsume_line();
            ability_radar();
            wonder_map();
            social_force();
        }
    });
    if (!isSupportCanvas()) {
        alert('温馨提示：使用最新版chrome浏览器效果更好~')
    }
});
</script>
</head>
<body>
<div class="dowebok-hd">
    <div class="inner">
        <h1><a href="#page1">征信信息</a></h1>
        <p>联通金融征信系统</p>
        <ul class="nav">
            <a href="#page1">首页</a>
            <a href="#page2">MUCR信用得分</a>
            <a href="#page3">多因子分析</a>
            <a href="#page4">个人信用走势</a>
            <a href="#page5">漫游系数</a>
            <a href="#page6">社交网络</a>
            <a href="#page7">2.0版本</a>
            <a href="<%=request.getContextPath()%>/pages/startpage.jsp?clear=true">退出</a>
        </ul>
    </div>
</div>

<div class="section section1">
    <%--<div style="background:url(/img/bg_1.jpg) 50% 50% no-repeat"></div>--%>
    <a class="godown" href="#page2"><span></span></a>
</div>

<div class="section section2">
    <%--<div style="background:url(/img/bg_1.jpg) 50% 50% no-repeat"></div>--%>
    <div class="middle">
        <div class="left left2 animate" rel="0,50%,50%,50%，700">
            <img src="../img/p2_l0.png" alt=""/>
            <img src="../img/p2_l1.png" alt=""/>
         </div>
        <div class="right right2 animate" rel="100% 50% 50% 50%" id="base_info" ></div>
    </div>
    <a class="godown" href="#page3"><span></span></a>
</div>

<div class="section section3">
    <div class="middle">
        <div id="abilityradar" class="left left3 animate" rel="0,50%,50%,50%，400">
        </div>
        <div class="right right3 animate" rel="100% 50% 50% 50%" style="background: url(../img/p3_r.png) 0 0 no-repeat;background-size: 100% 100%">
            <%--<h1 align="left" contenteditable="true">关键字</h1>--%>
            <%--<p align="left" contenteditable="true">本可视化布局程序在HTML5浏览器上运行更加完美, 能实现自动本地化保存, 即使关闭了网页, 下一次打开仍然能恢复上一次的操作.</p>--%>
        </div>
    </div>
    <a class="godown" href="#page4"><span></span></a>
</div>

<div class="section section4">

    <div class="middle">
        <div class="left left2 animate" rel="0,50%,50%,50%，700" style="background: url(../img/p4_l.png) 0 0 no-repeat;background-size: 100% 100%">
            <%--<h1 align="left" contenteditable="true">关键字</h1>--%>
            <%--<p align="left" contenteditable="true">本可视化布局程序在HTML5浏览器上运行更加完美, 能实现自动本地化保存, 即使关闭了网页, 下一次打开仍然能恢复上一次的操作.</p>--%>
        </div>
        <div class="right right2 animate" rel="100% 50% 50% 50%"  id="finance" ></div>
    </div>
    <a class="godown" href="#page5"><span></span></a>

</div>

<div class="section section5">
    <div class="middle">
        <div id="location" class="left left5 animate" rel="0,50%,50%,50%" >
        </div>
        <div class="right right5 animate" rel="100% 50% 50% 50%" style="background: url(../img/p5_r.png) 0 0 no-repeat;background-size: 100% 100%">
        </div>
    </div>
    <a class="godown" href="#page6"><span></span></a>
</div>

<div class="section section6">
    <div class="middle">
        <div class="left left6 animate" rel="0,50%,50%,50%" style="background: url(../img/p6_l.png) 0 0 no-repeat;background-size: 100% 100%">
        </div>
        <div class="right right6 animate" rel="100% 50% 50% 50%"  id="network" ></div>
    </div>
    <a class="godown" href="#page7"><span></span></a>
</div>

<div class="section section7">
    <div class="middle">
        <div class="left left7 animate" rel="0,50%,50%,50%" style="background: url(../img/p7_l.png) 0 0 no-repeat;background-size: 100% 100%">
        </div>
        <div class="right right7 animate" rel="100% 50% 50% 50%" style="background: url(../img/p7_r.png) 0 0 no-repeat;background-size: 100% 100%">
        </div>
    </div>
    <a class="godown" href="#page8"><span></span></a>
    <div class="qtcode"></div>

</div>

<div class="section section8">
</div>

<%--<script src=" http://hm.baidu.com/h.js?988268596e7a833ffbfb2e9f82d93e18"></script>--%>
<%--<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=ZUONbpqGBsYGXNIYHicvbAbM"></script>--%>

</body>
</html>
